<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    function wrap() {
        var a = "a";
        setTimeout(function () {
            console.log(a)
        },1000)
    }
    wrap()
</script>
</html>